<template>
	<view class="container">

		<view class="userBg statusBarHeight">
			<image :src="sellerObj.avatar" class="avatar" mode=""></image>
			<view class="userInfo">
				<view class="left">
					<view class="name" >
						{{sellerObj.name||""}}
					</view>

					<view class="telephone" >
						{{sellerObj.phone}}
					</view>
				</view>
			</view>
		</view>
		<view v-if="shopInfo.projectId!=9999" class="functionItem" @click="gotoCard">
			<view class="left">
				<image class="icon" src="@/static/image/icon_mycard.png" mode=""></image>
				我的名片
			</view>
			<view class="right">
				<image class="image" src="@/static/image/icon_more.png" mode=""></image>
			</view>
		</view>
		<view class="functionItem" @click="gotoSetting">
			<view class="left">
				<view class="icon">
					<u-icon color="#888" :size="'40rpx'" name="setting"></u-icon>
				</view>
				设置
			</view>
			<view class="right">
				<image class="image" src="@/static/image/icon_more.png" mode=""></image>
			</view>
		</view>
		
		<view class="detailContainer" @click="gotoProjectDetail">
			<view class="left">
				<image class="icon" src="@/static/image/icon_mine_list_guanyu.png" mode=""></image>
				关于
			</view>
			<view class="right">
				<image class="image" src="@/static/image/icon_more.png" mode=""></image>
			</view>
		</view>

	</view>
</template>

<script>
	let timeId = null
	import {
		mapState,
		mapMutations,
		mapActions
	} from 'vuex';

	const api = require("@/static/js/api.js")
	let that = null
	export default {
		data() {
			return {


			};
		},
		computed: {
			...mapState({
				hasLogin: state => state.userInfo.hasLogin,
				isAuthPhone: state => state.userInfo.isAuthPhone,
				isAuthUserInfo: state => state.userInfo.isAuthUserInfo,
				isSeller: state => state.userInfo.isSeller,
				isReferrer: state => state.userInfo.isReferrer,
				sellerObj: state => state.userInfo.sellerObj,
				buyerObj: state => state.userInfo.buyerObj,
				shopInfo: state => state.userInfo.shopInfo,
			}),
		},

		components: {

		},
		props: {
			
		},
		watch: {
			
		},

		mounted() {
			that = this
		},

		methods: {
			...mapActions(['loginWechat', 'interceptorLoginInfoAuth', 'interceptorLoginPhoneAuth', 'updateUserInfo']),
	
			gotoProjectDetail() {
				uni.navigateTo({
					url: "/pages/shop/about/index"
				})
			},
			gotoSetting(){
				uni.navigateTo({
					url: "/pages/shop/setting/index"
				})
			},
			gotoCard(){
				uni.navigateTo({
					url: "/pages/shop/myCard/editor"
				})
			}
		}
	};
</script>

<style lang="scss">
	.container {
		width: 100%;
		height: 100%;
		background-color: #f3f3f3;
	}



	.userBg {
		width: 750rpx;
		height: 300rpx;
		background-size: 100% 100%;
		background-image: url(@/static/image/bg_tabbar_home.png);
		display: flex;
		align-items: center;

		.avatar {
			width: 130rpx;
			height: 130rpx;
			margin-left: 40rpx;
			border-radius: 50%;
			overflow: hidden;
			background-color: #fff;
		}

		.login {
			width: 174rpx;
			height: 64rpx;
			margin-left: 28rpx;
			background-color: #ffffff;
			border-radius: 10rpx;
			font-size: 28rpx;
			font-weight: normal;
			font-stretch: normal;
			letter-spacing: 0rpx;
			color: #ff7927;
			line-height: 64rpx;
			text-align: center;
		}

		.userInfo {
			width: 580rpx;
			margin-left: 28rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.left {
				.name {
					font-size: 34rpx;
					line-height: 34rpx;
					font-weight: bold;
					color: #ffffff;
				}

				.telephone {
					font-size: 24rpx;
					line-height: 24rpx;
					color: #fff1d6;
					margin-top: 22rpx;
				}
			}

			.right {
				height: 100rpx;
				display: flex;
				align-items: center;
				font-size: 30rpx;
				// font-weight: bold;
				color: #ffffff;

				.image {
					margin-left: 10rpx;
					width: 18rpx;
					height: 26rpx;
					margin-right: 40rpx;
				}

			}
		}
	}

	.functionItem {
		width: 750rpx;
		height: 100rpx;
		background-color: #ffffff;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 1px;

		.left {
			font-size: 30rpx;
			color: #333333;
			margin-left: 40rpx;
			display: flex;
			align-items: center;

			.icon {
				width: 40rpx;
				height: 40rpx;
				// margin-left: 30rpx;
				margin-right: 30rpx;
			}
		}

		.right {
			display: flex;
			align-items: center;
			font-size: 30rpx;
			color: #999999;
			margin-right: 40rpx;

			.image {
				width: 16rpx;
				height: 22rpx;
				margin-left: 33rpx;
			}
		}
	}


	.detailContainer {
		width: 750rpx;
		height: 100rpx;
		background-color: #ffffff;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 1px;
		margin-top: 30rpx;

		.left {
			font-size: 30rpx;
			color: #333333;
			margin-left: 40rpx;
			display: flex;
			align-items: center;

			.icon {
				width: 40rpx;
				height: 40rpx;
				// margin-left: 30rpx;
				margin-right: 30rpx;
			}
		}

		.right {
			display: flex;
			align-items: center;
			font-size: 30rpx;
			color: #999999;
			margin-right: 40rpx;

			.image {
				width: 16rpx;
				height: 22rpx;
				margin-left: 33rpx;
			}
		}
	}

	.functionLine {
		width: 750rpx;
		height: 100rpx;
		background-color: #ffffff;
	}

	.itemContainer {
		width: 700rpx;
		height: 110rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-radius: 15rpx;
		color: #333333;
		background-color: #FFFFFF;
		margin-left: 25rpx;
		margin-top: 30rpx;

		.left {
			display: flex;
			align-items: center;

			.icon {
				width: 40rpx;
				height: 40rpx;
				margin-left: 30rpx;
				margin-right: 30rpx;
			}
		}

		.right {
			width: 16rpx;
			height: 22rpx;
			margin-right: 33rpx;
		}
	}
</style>
